package com.hackerrank.challenges.diwalilights;

import java.util.Scanner;

public class Solution {
	private static final int M = 100000;
	private static int pow(int b, int p) {
		if(p == 0)
			return 1;
		int r = pow(b, p / 2);
		r = (int)((1l * r * r) % M);
		if(p % 2 == 1)
			r = ((int)(2l * r) % M);
		return r;
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int T = in.nextInt();
		for(int t = 0; t < T; t++) {
			int N = in.nextInt(), e = pow(2, N);
			if(e == 0)
				e = M;
			System.out.println(e - 1);
		}
	}
}
